package com.rtx.wcs.std.service.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rtx.api.annotation.DataSourceAnnotation;
import com.rtx.wcs.std.bean.po.EdiTaskCallBackLog;
import com.rtx.wcs.std.handle.ristowcs.AbsTaskDownHandle;
import com.rtx.wcs.std.mapper.EdiTaskCallBackLogMapper;
import com.rtx.wcs.std.service.EdiTaskCallBackLogService;

@Service
public class EdiTaskCallBackLogServiceImpl extends ServiceImpl<EdiTaskCallBackLogMapper, EdiTaskCallBackLog> implements EdiTaskCallBackLogService{

	Logger logger = LoggerFactory.getLogger(AbsTaskDownHandle.class);
	
	@Transactional
	@DataSourceAnnotation
	@Override
	public void insertLog(String datasourcekey, List<EdiTaskCallBackLog> list) {
		try {
			for(EdiTaskCallBackLog log:list) {
				this.save(log);
			}
		} catch (Exception e) {
			logger.error("",e);
		}
	}

	@DataSourceAnnotation
	@Override
	public void insertLog(String datasourcekey, EdiTaskCallBackLog log) {
		try {
			this.save(log);
		} catch (Exception e) {
			logger.error("",e);
		}
	}

	
}
